package com.example.actionbardemo;

import com.example.actionbardemo.inter.ISelectListener;
import com.example.actionbardemo.tabandviewpager.TabViewPagerActivity;

import android.content.Intent;
import android.view.View;

public class ActionBarActivity extends FuncListActivity {
	
	@Override
	public void initData() {
		super.initData();
		data = new String[]{"下拉导航","操作视窗","标签导航","标签导航(tab_viewpager)"};
		listener = new ISelectListener() {
			
			@Override
			public void onSelect(View view, int position) {
//				Toast.makeText(ActionBarActivity.this, "点击第"+position+"个条目了!", Toast.LENGTH_SHORT).show();
				Intent intent = new Intent();
				switch (position) {
				case 0:
					intent.setClass(ActionBarActivity.this, PullDownNavActivity.class);
					break;
					
				case 1:
					intent.setClass(ActionBarActivity.this, OperateViewActivity.class);
					break;
					
				case 2:
					intent.setClass(ActionBarActivity.this, TabNavActivity.class);
					break;
					
				case 3:
					intent.setClass(ActionBarActivity.this, TabViewPagerActivity.class);
					break;

				default:
					break;
				}
				startActivity(intent);
			}
		};
	}
}
